package com.oneraku.service.controller;

import com.oneraku.service.domain.AgentSeckill;
import com.oneraku.service.service.IAgentSeckillService;
import com.oneraku.service.service.IAgentSeckillService;
import com.oneraku.service.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 集货仓列表
 * @Author: hui.ren@huberbuy.com
 * @Date: 2020/2/26 11:25
 */
@RestController
@RequestMapping("/agentSeckill")
public class AgentSeckillController {
    @Autowired
    private IAgentSeckillService agentSeckillService;
    /**
     * 列表 全部 集货仓
     * @param agentSeckill
     * @return
     */
    @PostMapping("/list")
    public R list(@RequestBody AgentSeckill agentSeckill) {
        return agentSeckillService.listAgentSeckill(agentSeckill);
    }
    /**
     * 编辑收货地址
     * @param agentSeckill
     * @return
     */
    @PostMapping("/edit")
    public R edit(@RequestBody AgentSeckill agentSeckill) {
        return agentSeckillService.editAgentSeckill(agentSeckill);
    }
    /**
     * 删除收货地址
     * @param agentSeckill
     * @return
     */
    @PostMapping("/del")
    public R del(@RequestBody AgentSeckill agentSeckill) {
        return agentSeckillService.delAgentSeckill(agentSeckill);
    }
    /**
     * 新增收货地址
     * @param agentSeckill
     * @return
     */
    @PostMapping("/add")
    public R add(@RequestBody AgentSeckill agentSeckill) {
        return agentSeckillService.addAgentSeckill(agentSeckill);
    }
}
